/*****************************************************************************
 *  This file is part of the OpenDomo project.
 *  Copyright(C) 2012 OpenDomo Services SL
 *  
 *  Daniel Lerch Hostalot <dlerch@opendomo.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *****************************************************************************/




#ifndef __VIRTUAL_PORTS_H__
#define __VIRTUAL_PORTS_H__

typedef struct virtual_selector_widgets_t virtual_selector_widgets_t;
struct virtual_selector_widgets_t
{
	char type_selected[32];
	GtkWidget *opt;	
	GtkWidget *menu;	
	GtkWidget *item0;	
	GtkWidget *item1;	
	GtkWidget *item2;	
	GtkWidget *item3;	

	char value_ad_selected[32];
	GtkWidget *value_ad_opt;	
	GtkWidget *value_ad_menu;	
	GtkWidget *value_ad_item1;	
	GtkWidget *value_ad_item2;	
	GtkWidget *entry_v_value;	

	GtkWidget *group_vp1_opt;	
	char group_vp1_selected[32];
	GtkWidget *group_vp1_menu;	
	GtkWidget *group_vp1_item[32];	
	GtkWidget *group_vp2_opt;	
	char group_vp2_selected[32];
	GtkWidget *group_vp2_menu;	
	GtkWidget *group_vp2_item[32];	
	char group_op_selected[32];
	GtkWidget *group_op_opt;	
	GtkWidget *group_op_menu;	
	GtkWidget *group_op_item1;	
	GtkWidget *group_op_item2;	
	GtkWidget *group_op_item3;	
	GtkWidget *group_op_item4;	
	GtkWidget *entry_v_group_op;	

	GtkWidget *trigger_cndp_opt;	
	char trigger_cndp_selected[32];
	GtkWidget *trigger_cndp_menu;	
	GtkWidget *trigger_cndp_item[32];	
	GtkWidget *trigger_outp_opt;	
	char trigger_outp_selected[32];
	GtkWidget *trigger_outp_menu;	
	GtkWidget *trigger_outp_item[8];	
	GtkWidget *trigger_outval_opt;	
	char trigger_outval_selected[32];
	GtkWidget *trigger_outval_menu;	
	GtkWidget *trigger_outval_item1;	
	GtkWidget *trigger_outval_item2;	
	GtkWidget *trigger_cnd_opt;	
	char trigger_cnd_selected[32];
	GtkWidget *trigger_cnd_menu;	
	GtkWidget *trigger_cnd_item1;	
	GtkWidget *trigger_cnd_item2;	
	GtkWidget *trigger_cnd_item3;	
	GtkWidget *trigger_cnd_item4;	
	GtkWidget *trigger_cnd_item5;	
	GtkWidget *trigger_cnd_item6;	
	GtkWidget *entry_v_trigger_outval;	
	
};


G_MODULE_EXPORT void cb_virtual_port_selector_activated(GtkWidget *w,
	virtual_selector_widgets_t *data);

void virtual_port_menu_select(virtual_selector_widgets_t *vsw, const char* txt);

void virtual_port_group_vp1_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_group_vp2_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_group_op_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_trigger_cndp_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_trigger_outp_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_trigger_cnd_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_trigger_outval_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_value_ad_select(virtual_selector_widgets_t *vsw, 
	const char* txt);

void virtual_port_widgets_create(
	virtual_selector_widgets_t *vsw, GtkWidget *parent, int x, int y);


#endif


